package cn.yunyichina.provider.framework.dubbo.service;

import cn.yunyichina.provider.framework.data.SpringContextHandler;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.iface.entity.common.ResponseObject;
import cn.yunyichina.provider.iface.service.IHymed;

/**
 * Created by Lullaby on 2017/10/25
 */
public class HymedService {

    private static final String SERVICENAME = "hymedService";

    private static IHymed hymedService = null;

    static {
        hymedService = SpringContextHandler.getBean(SERVICENAME);
    }

    public static IHymed getHyMedClient() {
        return hymedService;
    }

    public static Response callUnderlineFromInternal(String method, String data) {
        return hymedService.callUnderlineFromInternal("", method, data, (short) 0);
    }

    public static Response callUnderlineFromInternal(String sessionId, String method, String data) {
        return hymedService.callUnderlineFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String sessionId, String method, String data) {
        return hymedService.callHumpFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String method, String data) {
        return hymedService.callHumpFromInternal("", method, data, (short) 0);
    }

    public static ResponseObject callUnderlineFromInternalObject(String method, String data) {
        return hymedService.callUnderlineFromInternalObject("", method, data, (short) 0);
    }

}
